import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class LinkGenerator {

	public static void main(String[] args) {
		String line = readLn();
		while (line != null) {
			StringTokenizer st = new StringTokenizer(line);
			while (st.hasMoreTokens()) {
				process(st.nextToken());
			}
			line = readLn();
		}
	}
//	[369 | http://acm.uva.es/p/v3/369.html]
	private static void process(String string) {
		System.out.println("["+string + " | " + "http://acm.uva.es/p/v" + string.substring(0, string.length()-2) + "/"+ string + ".html" + "]"); 
	}

	static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	
	public static String readLn() {
		
		try {
			return br.readLine();
		} catch (IOException e) {
			return null;
		}
	}
	
	
	
}
